package co.yixiang.modules.system.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.*;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
* @author db
* @date 2020-10-16
*/
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("alipay_pay_log")
public class AlipayPayLog implements Serializable {

    @TableId
    private Integer id;


    /** 商户订单号 */
    private String outtradeno;


    /** 支付宝订单号 */
    private String tradeno;


    /** 支付金额 */
    private Integer totalamount;


    /** 支付状态 */
    private String tradestatus;


    /** 支付创建时间 */
    private LocalDateTime createTimes;


    /** 修改时间 */
    private LocalDateTime updateTimes;


    public void copy(AlipayPayLog source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
